package cn.tedu.mapper.petcategory;

import cn.tedu.pojo.pet.entity.PetCategory;
import cn.tedu.pojo.pet.entity.PetType;
import cn.tedu.pojo.pet.vo.PetCategoryVO;
import cn.tedu.pojo.pet.vo.PetTypeVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.List;

@Repository
public interface PetCategoryMapper {
    //管理员添加宠物品种列表
    int addCategory(PetCategory category);
    //管理员修改宠物品种列表
    void updateCategory(@Param("categoryName")String oldName,
                        @Param("newName")String newName,
                        @Param("gmtModified")LocalDateTime gmtModified);
    //管理员修改宠物品种启用状态
    void updateIsDelete(@Param("categoryName")String oldName,
                        @Param("isDelete")Integer isDelete);
    //通过type名字来从type表中获取id//
    PetType getIdByName(String typeName);
    //展示宠物品种列表//
    List<PetCategoryVO> listTypeNameById(Long id);

    PetCategory getByCategoryName(String categoryName);
    PetType getById(Long id);
}
